package com.yaodian100.ec.memberevent.service;

import java.util.List;

import com.yaodian100.core.common.dao.impl.CommonCriteria;
import com.yaodian100.core.common.exception.CoreException;
import com.yaodian100.core.common.service.DomainService;
import com.yaodian100.ec.member.entity.Member;
import com.yaodian100.ec.memberevent.entity.MemberEvent;
import com.yaodian100.ec.memberevent.entity.MemberGift;

/**
 * @author apple.chang
 * 
 */
public interface MemberEventService extends DomainService<MemberEvent> {

	/**
	 * 储存MemberEvent
	 * 
	 * @param entity
	 * @return
	 * @throws CoreException
	 */
	public MemberEvent saveMemberEvent(MemberEvent entity) throws CoreException;

	/**
	 * 检查并赠送 coupon or 购物金
	 * 
	 * @param member
	 */
	public MemberEvent checkActiveBonus_Coupon(Member member);

	/**
	 * 储存MemberGift
	 * 
	 * @param entity
	 * @return
	 * @throws CoreException
	 */
	public MemberGift saveMemberGift(MemberGift entity) throws CoreException;

	/**
	 * 取得赠礼活动entity
	 * 
	 * @param member
	 * @return
	 */
	public MemberGift checkActiveGift(Member member);

	/**
	 * 取得点活动entity
	 * 
	 * @param member
	 * @return
	 */
	public MemberEvent getActiveBonus_Coupon(Member member);

	/**
	 * 
	 * @param firstResult
	 * @param maxResults
	 * @param criteria
	 * @param sortOrder
	 * @return
	 * @throws CoreException
	 */
	public List<MemberGift> getMemberGiftList(int firstResult, int maxResults, CommonCriteria criteria, String[] sortOrder)
			throws CoreException;

	/**
	 * 
	 * @param criteria
	 * @return
	 * @throws CoreException
	 */
	public Number getMemberGiftListSize(CommonCriteria criteria) throws CoreException;

	/**
	 * 
	 * @param id
	 * @return
	 */
	public MemberGift getMemberGiftbyId(String id);

}